<?php
session_start(); // Démarrage de la session  ATTENTION TOUJOURS LA PREMIERE LIGNE DU FICHIER
header('Content-Type: text/xml; charset=utf-8');
error_reporting(E_ALL);
// Liste des variables
include_once $_SERVER['DOCUMENT_ROOT'].'/PariGest/pages/inc/variables.php';
// Gestion des exceptions 
include_once $REP_INC . 'exception.php';

date_default_timezone_set('Europe/Paris');

// Connection à la base
require_once $REP_OUTILS . 'bdd/monPDO.php';
$db = new monPDO();
$db->beginTransaction();

// Pour FirePHP
require_once($REP_LIB . 'FirePHPCore/FirePHP.class.php');
$trace = FirePHP::getInstance(true);
/*$trace->log('Hello World');
$trace->dump('Key', 'Value');
$trace->fb('Hello World');
$var = array('i'=>10, 'j'=>20); 
$trace->log($var, 'Iterators');*/

// Gestion des templates
include_once($REP_LIB . 'Template/template.php');
$template = new Template($REP_TEMPLATE);

// Gestion des templates
require_once($REP_LIB . 'Smarty/Smarty.class.php');
$smarty = new Smarty();
$smarty->template_dir = $REP_TEMPLATE;
$smarty->compile_dir  = $REP_LIB . 'Smarty/temp/templates_c/';
$smarty->config_dir   = $REP_LIB . 'Smarty/temp/configs/';
$smarty->cache_dir    = $REP_LIB . 'Smarty/temp/cache/';


// navigateur
if ((strstr ($_SERVER["HTTP_USER_AGENT"],"MSIE 5") || strstr ($_SERVER["HTTP_USER_AGENT"],"MSIE 6")) && !strstr ($_SERVER["HTTP_USER_AGENT"],"MSIE 7"))
{     // Internet Explorer 5 ou 6
	$NAVIGATEUR="IE6";
} else
{     // Autres navigateurs
	$NAVIGATEUR="MOZ";
}

if ($NAVIGATEUR=="MOZ")
{
	$stylePng="background:transparent url(/PariGest/img/";
	$stylePngScale="background:transparent url(/PariGest/img/";
}
else
{
	$stylePng="background-image: none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop src=/PariGest/img/";
	$stylePngScale="background-image: none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale src=/PariGest/img/";
}

?>